<template>
  <MainLayout>
    <section class="forum-header">
      <div class="container">
        <div class="forum-header-title">论坛</div>
        <div class="forum-header-content">
          获取最新趋势、新闻、资源和灵感，同时与AnyRender团队一起了解有关3D设计和增强现实的更多信息。
        </div>
      </div>
    </section>
    <section class="forum-content">
      <div class="container">
        <div class="forum-list">
          <div class="forum-item" v-for="(item, index) in forumList" :key="item.title">
            <div class="forum-item-inner">
              <img class="forum-item-img" :src="`/images/resources/forum/${index + 1}.jpg`" alt="" />
              <div class="forum-item-title">{{ item.title }}</div>
              <div class="forum-item-content">{{ item.content }}</div>
            </div>
          </div>
        </div>
        <div class="next-page">
          <div class="next-page-inner">下一页 <img src="/images/resources/forum/nextPage.jpg" alt="" /></div>
        </div>
      </div>
    </section>
  </MainLayout>
</template>

<script setup>
  import { ref } from "vue";

  const forumList = ref([
    {
      title: "放大CAD文件的影响",
      content: "从可视化到功能",
    },
    {
      title: "发现3D设计和增强现实的环保力量",
      content: "使用空间计算减少二氧化碳排放。",
    },
    {
      title: "关于配置器项目的热点替代方案的5个提示",
      content: "如何创造数字孪生体验。",
    },
    {
      title: "Apple Vision Pro的交互式产品可视化",
      content: "利用最新的沉浸式技术。",
    },
    {
      title: "Figma框架如何在AnyRender中优化纹理",
      content: "简化并加快流程。",
    },
    {
      title: "如何将交互式3D和AR产品添加到家居网站",
      content: "使用家居产品配置器转变您的电子商务业务。",
    },
    {
      title: "商业工作空间的力量",
      content: "团队的协作和项目安全。",
    },
    {
      title: "组织3D资产和库，以达到最高效率",
      content: "保持敏捷和有条不",
    },
    {
      title: "为您的包装设计工作流程添加交互式3D的5个技巧",
      content: "对于包装设计师来说，这是一个绝佳的机会。",
    },
    {
      title: "改变我们用交互式3D呈现的方式",
      content: "发现3D故事讲述。",
    },
    {
      title: "质地烘焙的重要性",
      content: "创建逼真的实时渲染。",
    },
    {
      title: "产品开发的最佳3D工作流程",
      content: "公司解决方案。",
    },
  ]);
</script>

<style lang="scss" scoped>
  @import "@/styles/variables.scss";

  .forum-header {
    padding: $spacing-xxl 0;

    .container {
      .forum-header-title {
        font-size: 68px;
        font-weight: 500;
        color: #000;
        line-height: 1.6;
        text-align: center;
        letter-spacing: 10px;
      }
      .forum-header-content {
        margin: 0 auto;
        width: 50%;
        text-align: center;
        font-size: 16px;
        color: #000;
      }

      // 响应式 平板
      @media (max-width: $breakpoint-tablet) {
        .forum-header-title {
          font-size: 48px;
          letter-spacing: 6px;
        }
        .forum-header-content {
          margin-top: 20px;
          font-size: 14px;
          width: 80%;
        }
      }
      @media (max-width: $breakpoint-mobile) {
        .forum-header-title {
          font-size: 36px;
          letter-spacing: 4px;
        }
      }
    }
  }

  .forum-content {
    padding: 25px 0;
    .container {
      .forum-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: stretch;
        gap: 15px;
        .forum-item {
          width: calc(33.33% - 15px);
          padding: 15px;
          background-color: #f7f7f7;
          border-radius: 14px;
          .forum-item-inner {
            width: 100%;
            height: 100%;
            border-radius: 14px;
            background-color: #fff;
            box-sizing: border-box;
            overflow: hidden;
            .forum-item-img {
              width: 100%;
              height: 200px;
              object-fit: cover;
            }
            .forum-item-title {
              padding: 25px 25px 0;
              font-size: 30px;
              font-weight: 500;
              color: #000;
            }
            .forum-item-content {
              padding: 25px;
              font-size: 16px;
              color: #000;
            }
          }
        }
      }
      .next-page {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 50px auto 70px;
        .next-page-inner {
          padding: 10px 20px;
          height: 40px;
          border: 1px solid #703ffa;
          border-radius: 6px;
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 16px;
          color: #703ffa;
          cursor: pointer;
          img {
            width: 18px;
            height: 8px;
            margin-left: 5px;
          }
        }
      }
      // 响应式 电脑
      @media (max-width: $breakpoint-desktop) {
        .forum-list {
          gap: 10px;
          .forum-item {
            width: calc(50% - 10px);
            padding: 10px;
            .forum-item-inner {
              .forum-item-img {
                height: 200px;
                object-fit: cover;
              }
              .forum-item-title {
                padding: 20px 20px 0;
                font-size: 26px;
              }
              .forum-item-content {
                padding: 20px;
              }
            }
          }
        }
      }
      // 响应式 平板
      @media (max-width: $breakpoint-tablet) {
        .forum-list {
          gap: 10px;
          .forum-item {
            width: 100%;
            padding: 8px;
            .forum-item-inner {
              .forum-item-img {
                height: 200px;
                object-fit: cover;
              }
              .forum-item-title {
                padding: 20px 20px 0;
                font-size: 24px;
                font-weight: 600;
              }
              .forum-item-content {
                padding: 20px;
                font-size: 14px;
              }
            }
          }
        }
        .next-page {
          .next-page-inner {
            padding: 5px 10px;
            height: 30px;
            border-radius: 5px;
            font-size: 14px;
            img {
              width: 12px;
              height: 6px;
              margin-left: 5px;
            }
          }
        }
      }
    }
  }
</style>
